apps: include <zephyr/video/video.h> for the video API - #84
Merged
Conversation
Zephyr 4.5 split the video API (zephyr#112420): the application-facing half moved to <zephyr/video/video.h>, while <zephyr/drivers/video.h> kept the driver-side pieces (video_device, video_ctrl, video_find_vdev) and now just includes the new header. Both apps are consumers - they use only buffer/format/stream calls, no driver-side types - so point them at the new header. video/video.h pulls in formats.h, which is what supplies VIDEO_FOURCC_TO_STR and video_bits_per_pixel; cam_mgmt.c keeps its explicit formats.h include. The out-of-tree video drivers in rosterloh-drivers are unaffected: as drivers they legitimately want <zephyr/drivers/video.h>. Verified: embedded_vision and data_collection --sysbuild both build. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Zephyr 4.5 (zephyr#112420, migration guide line 1354) split the video API. The release note frames it as "applications only need to rename the
#include", but it's a split rather than a rename:<zephyr/video/video.h>— the application-facing API (buffers, formats, streaming)<zephyr/drivers/video.h>— still 25 KB of driver-side API (video_device,video_ctrl,video_find_vdev), and now includes the new headerBoth apps are pure consumers — I checked every
video_*/VIDEO_*symbol they reference and none are driver-side — so they should be on the new header.applications/embedded_vision/src/main.cdrivers/video.h→video/video.happlications/data_collection/src/cam_mgmt.cdrivers/video.h→video/video.h, keeps its explicitvideo/formats.hVIDEO_FOURCC_TO_STRandvideo_bits_per_pixelcome fromvideo/formats.h, whichvideo/video.hincludes — somain.ckeeps them without adding an include.Not changed
The out-of-tree video drivers in
rosterloh-drivers(imx219.c,ov5647.c,arducam_pivariety.c,video_esp32_csi.c) are drivers, so<zephyr/drivers/video.h>remains correct for them. Three already include both headers;video_esp32_csi.cgets the consumer API transitively, which is fine.Verification
mise run agent-build embedded_visionandmise run agent-build data_collection --sysbuildboth build.🤖 Generated with Claude Code